package com.itheima.edu.info.manager.day18;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class Test {
    public static void main(String[] args) throws IllegalAccessException, InstantiationException, InvocationTargetException {
        Class c=ZhuJietest.class;
        Object o = c.newInstance();
        Method[] declaredMethods = c.getDeclaredMethods();
        for (Method declaredMethod : declaredMethods) {
            if(declaredMethod.isAnnotationPresent(ZhuJie.class)){
                Object invoke = declaredMethod.invoke(o);
                System.out.println(invoke);
            }
        }
    }
}
